#!/usr/bin/env python
# encoding: utf-8

import datetime
import uuid

def getFormatTime(date = None, format = '%Y-%m-%d %H:%M:%S'):
    if date is None:
        date = datetime.datetime.now()
    return date.strftime(format)

def getCurrentTime(format = '%Y-%m-%d %H:%M:%S'):
    return datetime.datetime.now().strftime(format)

def getCurrentDateTime(format = '%Y-%m-%d %H:%M:%S'):
    return datetime.datetime.now()

def generateUUID():
    return "".join(str(uuid.uuid4()).split("-")).upper()

class Helper():

    '''
    获取格式化时间
    '''
    @staticmethod
    def getFormatTime(date = None, format = '%Y-%m-%d %H:%M:%S'):
        if date is None:
            date = datetime.datetime.now()
        return date.strftime(format)

    '''
    获取当前时间
    '''
    @staticmethod
    def getCurrentTime(format = '%Y-%m-%d %H:%M:%S'):
        return datetime.datetime.now()


    '''
    生成随机字符串
    '''
    @staticmethod
    def generateMD5():
        date = datetime.datetime.now()

    '''
    生成uuid - 时间戳
    '''
    @staticmethod
    def generateUUID():
        return uuid.uuid1()
